
<div ng-controller="cart_controller">
    <link rel="stylesheet"  type="text/css"  href="../css/cart.css">
    <div class='header'>
        <button class="go_list" id="go_list" ng-click="click_list()">Let's Go</button>
            <button class="homepage" id="homepage"  ng-click="click_home()">主页</button>
            <button class="goods_list" id="goods_list"  ng-click="click_list()">商品列表</button>
            <button class="cart" id="cart">
            <img src="../icon/white_cart.png" alt="购物车的图标"/><a>购物车(<strong id="count" ng-model="sum_count">{{sum_count}}</strong>)</a>
        </button>
    </div>
    <div class="shopping_list">
        <div class="list_text">购物清单</div>
        <table>
            <thead>
            <tr class="table_head">
                <th class="classification">分类</th>
                <th class="name">名称</th>
                <th class="price">单价(元)</th>
                <th class="unit">单位</th>
                <th class="count">数量</th>
                <th class="subtotal">小计</th>
            </tr>
            <tr ng-repeat="one_goods in cart_goods">
                <td>{{one_goods.classification}}</td>
                <td>{{one_goods.name}}</td>
                <td class="number">{{one_goods.price}}</td>
                <td>{{one_goods.unit}}</td>
                <td >
                    <div>
                        <button ng-click="add_lest_count(one_goods,-1)">-</button
                        ><input  type="text"  ng-model="one_goods.count" ng-change="enter_input(one_goods)" onkeyup="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}" onafterpaste="if(this.value.length==1){this.value=this.value.replace(/[^1-9]/g,'')}else{this.value=this.value.replace(/\D/g,'')}"
                    ><button ng-click="add_lest_count(one_goods,1)" >+</button>
                    </div>
                </td>
                <td class="number" ng-model="subtotal">{{one_goods.subtotal}}元<a ng-if="show_original_price(one_goods.subtotal,one_goods.original_price)">(原价：  {{one_goods.original_price}}元)</a></td>
            </tr>
            </thead>
        </table>
        <div class="sum_money">总计：<a ng-model="total">{{total}}</a>(元)</div>
        <button id="pay"  ng-click="click_pay()">付款</button>
    </div>
</div>
